#ifndef LIVEWEBENTRY_DAO_H
#define LIVEWEBENTRY_DAO_H

#include "libs/core/model/modeltype.h"
#include <QSqlDatabase>
#include <QVector>

class LiveWebEntryDAO
{
public:
    explicit LiveWebEntryDAO(QSqlDatabase& db);

    bool createTable();

    bool insert(const yc::LiveWebEntry& entry);
    bool update(const yc::LiveWebEntry& entry);
    bool remove(int platform);
    yc::LiveWebEntry getByPlatform(int platform);
    int getVersionByPlatform(int platform);
    QVector<yc::LiveWebEntry> getAll();

private:
    QSqlDatabase& m_db;
};

#endif // LIVEWEBENTRY_DAO_H
